package com.wing.qualityTesting.model.entity;

import java.io.Serializable;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.core.enums.IEnum;
import com.wing.mybatis.common.BaseEntity;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

/**
 * 开工单质检任务表
 *
 * @author
 */
@Data
@NoArgsConstructor
@Accessors(chain = true)
@TableName("ord_work_order_quality_testing_task")
public class WorkOrderQualityTestingTask extends BaseEntity<WorkOrderQualityTestingTask> implements Serializable {

    private static final long serialVersionUID = 1L;

    public enum Status implements IEnum<Integer> {
        /**
        * 送检中
        */
        inspect(0,"送检中"),
        /**
        * 完成
        */
        finish(1,"完成"),
        /**
         * 待确认
         */
        confirm(2,"待认领"),
        /**
         * 关闭
         */
        close(3,"关闭");
   ;

        private int code;
        private String desc;

        Status(int code,String desc){
            this.code=code;
            this.desc=desc;
        }

        @Override
        public Integer getValue(){
            return this.code;
        }

        public String getDesc(){
            return this.desc;
        }
    }

    /**
     * 创建者
     */
    private Long creator;

    /**
     * 修改者
     */
    private Long modifier;

    /**
     * 创建人
     */
    private String creatorName;

    /**
     * 修改人
     */
    private String modifierName;

    /**
     * day
     */
    private Integer day;

    /**
     * no
     */
    private Integer no;

    /**
     * 企业编号
     */
    private String enterpriseCode;

    /**
     * 质检任务单编码
     */
    private String code;

    /**
     * 开工单id
     */
    private Long workOrderId;

    /**
     * 报工单id
     */
    private Long reportOrderId;

    /**
     * 质检分类id
     */
    private Long qualityTestingCategoryId;

    /**
     * 质检性质
     */
    private Long qualityTestingNatureId;

    /**
     * 质检类型id
     */
    private Long qualityTestingTypeId;

    /**
     * 送检数量
     */
    private Integer submissionQuantity;

    /**
     * 状态
     */
    private Status status;

    /**
    * 状态描述
    */
    @TableField(exist = false)
    private String statusDesc;

    public String getStatusDesc() {
        return status == null ? null : status.getDesc();
    }

    /**
     * 检验工站编号
     */
    private String inspectDeviceCode;

    /**
     * 首件检状态
     */
    private String firstCheckStatus;

    /**
     * 送检载具编码
     */
    private String carrierCode;
    private Long submitPostId;
    private Long submitDepId;

    /**
     * 质检类型
     */
    private Integer qcQualityTypeId;

    /**
     * 批次号
     */
    private String batchNumber;

    /**
     * 不合格数
     */
    private Integer notQuantity;



    /**
     *合格数(简易独有)
     */
    private Integer okQuantity;
    /**
     *返修数(简易独有)
     */
    private Integer returnQuantity;
    /**
     *报废数(简易独有)
     */
    private Integer ngQuantity;
    /**
     *合格入仓库(简易独有)
     */
    private Long okWarehouseType;
    /**
     *报废入仓库(简易独有)
     */
    private Long ngWarehouseType;
    /**
     *返修入仓库(简易独有)
     */
    private Long returnWarehouseType;

/*

    public enum QcQualityTypeId implements IEnum<Integer> {
        */
/**
         * 送检中
         *//*

        one(1,"来料质检(1QC)"),
        */
/**
         * 完成
         *//*

        two(2,"工序质检(IPQC)"),
        */
/**
         * 待确认
         *//*

        three(3,"成品质检(FQC)"),

        ;

        private int code;
        private String desc;

        QcQualityTypeId(int code,String desc){
            this.code=code;
            this.desc=desc;
        }

        @Override
        public Integer getValue(){
            return this.code;
        }

        public String getDesc(){
            return this.desc;
        }
    }
*/


}
